﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using brockredge.CLASSES;

namespace brockredge
{
    public partial class Start : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(Session["userId"]==null)
               lolbl.Text = "Login";
            else
                lolbl.Text="Logout";
            testDataContext adc = new testDataContext();
            var addvertisementQ = from add in adc.Advertisements
                                  orderby add.createDate descending
                                  select add;

            if (addvertisementQ.Count() > 0)
            {
                leftAddRep.DataSource = addvertisementQ;
                leftAddRep.DataBind();
            }
        }

      

    }
}